// src/api/login.js
import request from '@/utils/request';

export function loginWithPassword(data) {
    return request({
        url: '/login/',
        method: 'post',
        data,
    });
}
export function loginWithEmailCode(data) {
    return request({
        url: '/login/email',
        method: 'post',
        data,
    });
}

export function sendEmailCode(email) {
    return request({
        url: '/code/send',
        method: 'post',
        data: {
            "email": email
        },
        headers: { 'Content-Type': 'application/json' }
    });
}
export function register(data) {
    return request({
        url: '/register',
        method: 'post',
        data
    });
}